Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix webserver healthcheck issue #197

Merged
merged 1 commit into from
Dec 23, 2024

Conversation

0x4r45h
Copy link
Contributor

@0x4r45h 0x4r45h commented Dec 12, 2024

add curl to the webserver docker image so that the health check can be monitored correctly
ignore docker-compose.override.* files from the repository for easier customization

@Fraccaman
Copy link
Member

i dont get why we need curl?

@0x4r45h
Copy link
Contributor Author

0x4r45h commented Dec 13, 2024

i dont get why we need curl?

@Fraccaman The webserver service in the docker-compose.yml file has a health check block defined as follows:

Copy code
healthcheck:
  test: curl --fail http://localhost:5001/health || exit 1

However, the webserver image does not have the curl command installed. As a result, the health check always fails, incorrectly marking the container as "unhealthy." If you inspect the webserver container, under the health key, you’ll see the corresponding health check errors.

            "Health": {
                "Status": "unhealthy",
                "FailingStreak": 42,
                "Log": [
                    {
                        "Start": "2024-12-13T18:27:05.946254729+01:00",
                        "End": "2024-12-13T18:27:05.976298009+01:00",
                        "ExitCode": 1,
                        "Output": "/bin/sh: 1: curl: not found\n"
                    },
                    {
                        "Start": "2024-12-13T18:27:20.976796091+01:00",
                        "End": "2024-12-13T18:27:21.036034605+01:00",
                        "ExitCode": 1,
                        "Output": "/bin/sh: 1: curl: not found\n"
                    },
                ]
            }

To resolve this, we should either:

  • Install curl in the webserver image, or
  • Modify the health check block in the docker-compose.yml file to use an alternative method.

@Fraccaman
Copy link
Member

can you rebase on main ?

ignore compose override files from repository for easier customization
@0x4r45h 0x4r45h force-pushed the fix/webserver-health-check branch from 284a83b to bea1c9e Compare December 17, 2024 22:51
@0x4r45h
Copy link
Contributor Author

0x4r45h commented Dec 17, 2024

can you rebase on main ?
done

@Fraccaman Fraccaman added this pull request to the merge queue Dec 23, 2024
Merged via the queue into anoma:main with commit fbf1538 Dec 23, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants